// JointPortOwner.h: interface for the JointPortOwner class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_JOINTPORTOWNER_H__3931602A_49BA_4BAE_9FE7_52F57B729DBD__INCLUDED_)
#define AFX_JOINTPORTOWNER_H__3931602A_49BA_4BAE_9FE7_52F57B729DBD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Attachable.h"
#include "JointPort.h"

namespace JointSystem
{

class AFX_EXT_CLASS JointPortOwner : public Attachable
{
public:
	JointPortOwner( JointPortOwner* owner = 0 );
	virtual ~JointPortOwner();
	JointPortOwner( const JointPortOwner& jpo );

public:
	int GetJointPortCount() const { return m_JointPorts.GetSize(); }
	JointPort* GetJointPortAt( int index ) const { return m_JointPorts.GetAt( index ); }
	void AddJointPort( JointPort* aJPort ) { m_JointPorts.Add( aJPort ); }

protected:
	void ClearJointPorts();

private:
	CArray<JointPort*,JointPort*> m_JointPorts;
};
};
#endif // !defined(AFX_JOINTPORTOWNER_H__3931602A_49BA_4BAE_9FE7_52F57B729DBD__INCLUDED_)
